1. Field of the Invention
This invention relates to systems and methods for more efficiently reclaiming space in a journal used to track metadata changes.
2. Background of the Invention
In storage systems such as the IBM DS8000™ enterprise storage system, a journal is maintained for Copy Services (CS) transactions. The journal is stored in non-volatile memory (NVS). When a metadata track is modified in the cache of the DS8000™ the metadata track does not need to be destaged immediately for the transaction to be considered complete. Instead a copy of the modification to the metadata track is saved in a journal entry (or block). If power is interrupted to the DS8000™, any modifications to the metadata track may be recovered from the journal. A metadata track may be modified multiple times before it is destaged from the cache. All of the modifications to the metadata track may be stored as a chain of journal blocks. When a metadata track is eventually destaged, all of the journal blocks associated with metadata track may be released.
As metadata tracks are modified, journal space is consumed and at some point the journal will become full. When the journal is full, space needs to be reclaimed in the journal prior to completing any new transactions. In the current implementation of the DS8000™, a significant number of threads are dedicated to completing new transactions and recording metadata changes in the journal. However, there are only two threads (i.e., an LRU Controller thread and a Journal Cleaner thread associated with Copy Services) that dedicate time and resources to reclaiming journal space. This makes the journal a potential performance bottleneck in the DS8000™.
In current implementations, the LRU Controller thread is responsible for handling cache resources in addition to cleaning the journal. Thus, the LRU Controller thread may need to split CPU cycles between multiple tasks, thereby limiting its ability to fully dedicate its attention to cleaning the journal. The LRU Controller thread is further limited in that it only references a single LRU (Least Recently Used) list to clean journal blocks. This LRU list is used for all metadata tracks including metadata tracks whose changes are not recorded in the journal (i.e., “non-journaled” metadata tracks). Thus, when referencing the LRU list to clean the journal, the LRU Controller thread may need to repeatedly skip over and ignore “non-journaled” metadata tracks, further reducing efficiency. The Journal Cleaner thread also suffers from inefficiencies in that, when it cleans blocks associated with a particular metadata track from the journal, it needs to wait for the metadata track to be destaged from cache to disk prior to moving on to blocks associated with other metadata tracks.
In view of the foregoing, what are needed are systems and methods to more efficiently reclaim space in the above-described journal. Ideally, such system and methods will be able to dedicate additional resources to cleaning the journal if and when they are needed. Further needed are systems and methods to ensure that journal space is used in an efficient and effective manner.